package com.ltmall.api.manager;

import com.ltmall.api.bean.*;
import com.ltmall.api.entity.ThJsonCateGroup;
import com.ltmall.api.entity.ThJsonCategory;
import com.ltmall.api.entity.ThJsonRemoteTopic;
import com.ltmall.api.entity.ThJsonTopics;
import com.ltmall.api.util.PageUtil;

import java.util.List;

public interface GoodsManager {

    /**
     * Gets the shop ID.
     *
     * @param province the province
     * @param city the city
     * @param county the county
     * @return the shop ID
     */
    // 根据省市县获取商店ID
    public List<Integer> getShopID(String province, String city, String county);

    /**
     * Five hot city.
     *
     * @return the list
     */
    // 获取最新的五个开通的城市
    public List<HotCity> fiveHotCity();

    /**
     * Recomment city list.
     *
     * @param city the city
     * @param county the county
     * @return the list
     */
    // 获取推荐城市
    public List<HotCity> recommentCityList(String city, String county);

    /**
     * Recomment city list get.
     *
     * @param city the city
     * @param county the county
     * @return the list
     */
    public List<?> recommentCityListGet(String city, String county);

    /**
     * Goods detail.
     *
     * @param goodsID the goods ID
     * @return the goods
     */
    // 获取商品详情
    public Goods goodsDetail(int goodsID);

    /**
     * Goods server.
     *
     * @param goodsID the goods ID
     * @return the goods server
     */
    // 获取商品服务
    public GoodsServer goodsServer(int goodsID);

    /**
     * Shop detail.
     *
     * @param shopID the shop ID
     * @return the shop
     */
    // 获取商店信息
    public Shop shopDetail(int shopID);

    /**
     * Goods story.
     *
     * @param goodsID the goods ID
     * @return the goods story
     */
    // 香味故事
    public GoodsStory goodsStory(int goodsID);

    /**
     * Shop by bussiness.
     *
     * @param bussinessID the bussiness ID
     * @return the shop
     */
    // 获取商店信息
    public Shop shopByBussiness(int bussinessID);

    /**
     * Brand goods.
     *
     * @param brandID the brand ID
     * @param type the type
     * @param page the page
     * @return the list
     */
    // 其他商品
    public List<?> brandGoods(int brandID, int type, PageUtil page);

    /**
     * Hot goods.
     *
     * @param province the province
     * @param city the city
     * @param county the county
     * @param page the page
     * @return the list
     */
    // 热气榜单
    public List<Goods> hotGoods(String province, String city, String county, PageUtil page);

    /**
     * Popular goods get.
     *
     * @param province the province
     * @param city the city
     * @param county the county
     * @param page the page
     * @return the list
     */
    public List<Goods> popularGoodsGet(String province, String city, String county, PageUtil page);

    /**
     * Wholesale goods get.
     *
     * @param goodsType the goods type
     * @param province the province
     * @param city the city
     * @param county the county
     * @param type the type
     * @param page the page
     * @return the list
     */
    // 超值量贩
    public List<Goods> wholesaleGoodsGet(String goodsType, String province, String city,
                                         String county, int type, PageUtil page);

    /**
     * Gets the store houses.
     *
     * @param userID the user ID
     * @return the store houses
     */
    // 获取同一个圈子里面的商家
    public List<StoreHouse> getStoreHouses(int userID);

    /**
     * Ping goods.
     *
     * @param shopIDList the shop ID list
     * @param goodsID the goods ID
     * @param page the page
     * @return the list
     */
    // 获取圈子里面商品的列表
    public List<?> pingGoods(List<Integer> shopIDList, int goodsID, PageUtil page);

    /**
     * Goods more.
     *
     * @param goodsID the goods ID
     * @return the goods more
     */
    // 商品查看更多
    public GoodsMore goodsMore(int goodsID);

    /**
     * Latest comment.
     *
     * @param goodsID the goods ID
     * @return the list
     */
    // 获取商品最新的一条评论
    public List<?> latestComment(int goodsID);

    /**
     * Comment list.
     *
     * @param goodsID the goods ID
     * @param page the page
     * @return the list
     */
    // 获取商品评论列表
    public List<?> commentList(int goodsID, PageUtil page);

    /**
     * Ads.
     *
     * @param type the type
     * @param number the number
     * @return the list
     */
    // 广告
    public List<ADS> ads(int type, int number);

    /**
     * Latest activity.
     *
     * @return the activity
     */
    // 获取最近的活动
    public Activity latestActivity();

    /**
     * Shop ADS.
     *
     * @param number the number
     * @param bussinessID the bussiness ID
     * @return the list
     */
    // 商家广告
    public List<BussinessADS> shopADS(int number, int bussinessID);

    /**
     * Gets the bussiness.
     *
     * @param province the province
     * @param city the city
     * @param county the county
     * @param type the type
     * @return the bussiness
     */
    // 根据省市县获取轮播图
    public int getBussiness(String province, String city, String county, int type);

    /**
     * Update goods number.
     *
     * @param goodsID the goods ID
     * @param deleteNumber the delete number
     */
    // 修改库存
    public void updateGoodsNumber(int goodsID, int deleteNumber);

    /**
     * Update sell out.
     *
     * @param goodsID the goods ID
     * @param sellOutNumber the sell out number
     */
    // 修改销量
    public void updateSellOut(int goodsID, int sellOutNumber);

    /**
     * Gets the price.
     *
     * @param goodsID the goods ID
     * @return the price
     */
    // 获取商品价格
    public List<ThSku> getPrice(int goodsID);

    /**
     * Gets the brand.
     *
     * @param brandID the brand ID
     * @return the brand
     */
    // 获取品牌
    public Brand getBrand(int brandID);

    /**
     * Remind.
     *
     * @param goodsID the goods ID
     * @param type the type
     * @return true, if successful
     */
    // 设置提示
    public boolean remind(int goodsID, int type);

    /**
     * Remind number.
     *
     * @param goodsID the goods ID
     * @return the int
     */
    // 设置提醒的人数
    public int remindNumber(int goodsID);

    /**
     * Checks if is collection.
     *
     * @param userID the user ID
     * @param goodsID the goods ID
     * @return the int
     */
    // 是否收藏
    public int isCollection(int userID, int goodsID);

    /**
     * Gets the auto reply.
     *
     * @param shopID the shop ID
     * @return the auto reply
     */
    // 获取自动回复
    public AutoReply getAutoReply(int shopID);

    /**
     * Comment number.
     *
     * @param goodsID the goods ID
     * @return the int
     */
    // 评论数量
    public int commentNumber(int goodsID);

    /**
     * Goods rating.
     *
     * @param goodsID the goods ID
     * @return the list
     */
    // 评分
    public List<?> goodsRating(int goodsID);

    /**
     * Gets the shop ID.
     *
     * @param type the type
     * @param province the province
     * @param city the city
     * @param county the county
     * @return the shop ID
     */
    // 获取商店
    public int getShopID(int type, String province, String city, String county);

    /**
     * Goods price.
     *
     * @param goodsID the goods ID
     * @param format the format
     * @return the goods price
     */
    // 获取商品规格
    public ThSku goodsPrice(int goodsID, String format);

    /**
     * 根据skuID获取商品规格.
     *
     * @param skuID the sku ID
     * @return the goods price
     */
    public ThSku getGoodsPrice(int skuID);

    /**
     * Cast list.
     *
     * @return the list
     */
    // 获取广播列表
    public List<Broadcast> castList();

    /**
     * Gets the model picture.
     *
     * @return the model picture
     */
    // 获取模块图列表
    public ModelPicture getModelPicture();

    /**
     * Gets the prepay.
     *
     * @param goodsID the goods ID
     * @return the prepay
     */
    // 获取时令果蔬的预付款
    public PrePay getPrepay(int goodsID);

    /**
     * Gets the activity price.
     *
     * @param activityID the activity ID
     * @param goodsID the goods ID
     * @param format the format
     * @return the activity price
     */
    // 获取活动商品的价格
    public ActivityPrice getActivityPrice(int activityID, int goodsID, String format);

    /**
     * Gets the bussiness info.
     *
     * @param bussinessID the bussiness ID
     * @return the bussiness info
     */
    // 获取商家
    public BussinessInfo getBussinessInfo(int bussinessID);

    /**
     * Good comment.
     *
     * @param goodsID the goods ID
     * @return the int
     */
    // 好评数量
    public int goodComment(int goodsID);

    /**
     * Gets the activity price.
     *
     * @param goodsID the goods ID
     * @param format the format
     * @return the activity price
     */
    // 获取活动商品
    public ActivityPrice getActivityPrice(int goodsID, String format);

    /**
     * Sku get.
     *
     * @param skuId the sku id
     * @return the goods price
     */
    public ThSku skuGet(int skuId);

    /**
     * Group buying group rules get.
     *
     * @param page the page
     * @return the list
     */
    public List<ThGroupBuyingRules> groupBuyingGroupRulesGet(PageUtil page);

    /**
     * Group buying group get.
     *
     * @param groupRulesId the group rules id
     * @param num the num
     * @return the list
     */
    public List<ThGroupBuying> groupBuyingGroupGet(int groupRulesId, int num);

    /**
     * Group buying rule get.
     *
     * @param groupRulesId the group rules id
     * @return the th group buying rules
     */
    public ThGroupBuyingRules groupBuyingRuleGet(int groupRulesId);

    /**
     * Group buying get.
     *
     * @param groupRulesId the group rules id
     * @param userId the user id
     * @return the th group buying
     */
    public ThGroupBuying groupBuyingGet(int groupRulesId, int userId);

    /**
     * Group buying get.
     *
     * @param groupId the group id
     * @return the th group buying
     */
    public ThGroupBuying groupBuyingGet(int groupId);

    /**
     * Group buying update.
     *
     * @param group the group
     * @return true, if successful
     */
    public boolean groupBuyingUpdate(ThGroupBuying group);

    /**
     * Group bying history get.
     *
     * @param groupId the group id
     * @return the list
     */
    public List<?> groupByingHistoryGet(int groupId);

    /**
     * Group buying users get.
     *
     * @param userID the user ID
     * @param skuID the sku ID
     * @return the client info[]
     */
    public ClientInfo[] groupBuyingUsersGet(int userID, int skuID);

    /**
     * Join group buying goup.
     *
     * @param userID the user ID
     * @param groupID the group ID
     * @param skuID the sku ID
     * @param num the num
     * @return true, if successful
     */
    public boolean joinGroupBuyingGoup(int userID, int groupID, int skuID, int num);

    /**
     * Gets the business by county.
     *
     * @param countyID the county ID
     * @return the business by county
     */
    // 根据区县获取商家
    public BussinessInfo getBusinessByCounty(String countyID);

    /**
     * Gets the cate list by parent and bussiness.
     *
     * @param parentID the parent ID
     * @param bussinessID the bussiness ID
     * @param page the page
     * @return the cate list by parent and bussiness
     */
    // 根据商家获取分类
    public List<ThCategories> getCateListByParentAndBussiness(int parentID, int bussinessID,
                                                              PageUtil page);

    /**
     * Category tree get.
     *
     * @param shopId the shop id
     * @return the list
     */
    // 获取全部根分类
    public List<ThJsonCateGroup> categoryTreeGet(int shopId);

    /**
     * Gets the goods by sub cate.
     *
     * @param cateID the cate ID
     * @return the goods by sub cate
     */
    public List<?> getGoodsBySubCate(int cateID);

    /**
     * Gets the sub cate by root cate.
     *
     * @param cateID the cate ID
     * @return the sub cate by root cate
     */
    public List<ThCategories> getSubCateByRootCate(int cateID);

    /**
     * Gets the goods by sub cates.
     *
     * @param cateIDs the cate I ds
     * @return the goods by sub cates
     */
    public List<?> getGoodsBySubCates(List<Integer> cateIDs);

    /**
     * Topics get.
     *
     * @param shopId the shop id
     * @param categoryId the category id
     * @return the list
     */
    // 获取专题列表
    public List<ThJsonTopics> topicsGet(int shopId, int categoryId);

    /**
     * Topic get.
     *
     * @param topicId the topic id
     * @return the th json remote topic
     */
    // 获取专题
    public ThJsonRemoteTopic topicGet(int topicId, int shopId);

    /**
     * 根据商店ID获取专题列表.
     *
     * @param shopId the shop id
     * @param state TODO
     * @param startTime the start time
     * @param endTime the end time
     * @param page TODO
     * @return 专题列表
     */
    public List<?> getTopics(String topicsType, int shopId, String state, String startTime,
                             String endTime, PageUtil page);

    /**
     * Banner list get.
     *
     * @return the list
     */
    // 获取banner列表
    public List<ThBanners> bannerListGet();

    /**
     * Cate list in shop.
     *
     * @param shopId the shop id
     * @return the list
     */
    // 获取指定商店中，存在专题的分类id列表
    public List<?> cateListInShop(int shopId);

    /**
     * Goods list.
     *
     * @param type the type
     * @param page the page
     * @return the list
     */
    // 获取商品列表
    public List<?> goodsList(int type, PageUtil page);

    /**
     * Goods list.
     *
     * @param shopID the shop ID
     * @param type the type
     * @param page the page
     * @return the list
     */
    // 获取商品列表
    public List<?> goodsList(int shopID, int type, PageUtil page);

    /**
     * Gets the goods list by shop id.
     *
     * @param shopId the shop id
     * @param page the page
     * @return the goods list by shop id
     */
    //根据商店ID获取商品列表
    public List<?> getGoodsListByShopId(int shopId, PageUtil page);

    /**
     * Shop id get.
     *
     * @param province the province
     * @param city the city
     * @param country the country
     * @return the int
     */
    //获取商店ID
    public int shopIdGet(String province, String city, String country);

    /**
     * Compare img.
     */
    public void compareImg();

    /**
     * 更新state.
     *
     * @param state the state
     * @param topicId the topic id
     * @return true, if successful
     */
    public boolean updateTopicState(int state, int topicId);

    /**
     * 获取所有图片.
     *
     * @param page TODO
     * @return the all images
     */
    public List<String> getAllImages(PageUtil page);

    /**
     * Reduce sku stock.
     *
     * @param skuId the sku id
     * @param number the number
     * @return true, if successful
     */
    public boolean reduceSkuStock(int skuId, int number);

    /**
     * 将goods下第一条SKU的库存赋予goods
     *
     * @param goodsID the goods ID
     */
    public void updateGoodsStock(int goodsID);

    public void updateSkuSellOut(int skuID, int sellNumber);

    public List<?> getGoodsListWithSkusByShopId(int shopId, PageUtil page);

    public List<Goods> convertSkuData(List<Goods> goodsList);

    public List<?> goodsListByType(final int type, final PageUtil page);

    /**
     * 获取一级分类下的所有二级分类
     * @return
     */
    public List<ThJsonCategory> getCategoryList(int cateId);

    public List<Integer> getShopIdByAreaName(String province, String city, String country);

    public List<?> goodsListByShopIdList(List<Integer> shopIdList, PageUtil page);

    //获取小区团购主题
    public ThGroupBuyingActivity groupBuyingActivityGet(int groupType);

    //小区团购商品
    public List<?> groupBuyingActivityList(PageUtil page, String directId, int groupType);

    public ThGroupBuying groupBuyingGetByRulesId(int groupRulesId);

    public int getGoodSaleHisAmount(int goodId);

}
